package com.qiwx.pigeon.adapter.home;

import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.qiwx.pigeon.R;
import com.qiwx.pigeon.data.CageStatusConfig;
import com.qiwx.pigeon.data.vo.CageBean;
import com.qiwx.pigeon.data.vo.HomeRemindBean;
import com.qiwx.pigeon.widget.EggView;

import java.util.List;

/**
 * @description
 * @Author qiwx
 * @Date 2020-04-05 13:11
 * 首页提醒Adapter
 **/
public class HomeRemindAdapter extends BaseQuickAdapter<HomeRemindBean, BaseViewHolder> {
    public HomeRemindAdapter(int layoutResId, List<HomeRemindBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, HomeRemindBean bean) {
        holder.setText(R.id.txt_name, bean.getName());
        if (bean.getMessageAmount() > 0) {
            holder.getView(R.id.txt_remind).setVisibility(View.VISIBLE);
        } else {
            holder.getView(R.id.txt_remind).setVisibility(View.GONE);
        }
        holder.setText(R.id.txt_remind, bean.getMessageAmount() + "");

    }
}
